home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 8654 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  900 b 

  1. Path: laurel.yorku.ca!yu114405
  2. From: yu114405@yorku.ca (Naftali Sturm)
  3. Newsgroups: comp.lang.c
  4. Subject: Help with sin() - big problem
  5. Date: 5 Mar 1996 17:50:10 GMT
  6. Organization: York University
  7. Message-ID: <4hhusi$49i@sunburst.ccs.yorku.ca>
  8. NNTP-Posting-Host: laurel.yorku.ca
  9. X-Newsreader: TIN [version 1.2 PL2]
  10.  
  11. I have a big problem.
  12. I am making a math and trigonometry program which, one of its functions
  13. is to compute the sine of a number.
  14.  The way I did it was. 
  15.     result = sin(numb);
  16.  
  17. result and num are both float's.
  18.  The problem is that when numb is 1.0, the
  19. program gives me .84147 , and when numb is 45.0 
  20. the program gives me .85090, and each number is a different result.
  21. However I took a look at my sine table in my trigonometry book, and
  22. it says the sine of 1 is .018, the sine of 45 is .707, and
  23. different results than what my program said.
  24.   Why?
  25.  
  26. thank(you); for(your=help;;) { }
  27.  
  28.  
  29.